package com.itheima.dto;

import com.itheima.entity.YddCate;
import lombok.Data;

@Data
public class CateDTO {
    private Integer id;
    private String catename;
    private Integer sort_num;
    private String icon;
    private String default_data;

    public YddCate transformYddCate(){
        YddCate yddCate = new YddCate();
        yddCate.setId(this.id);
        yddCate.setCatename(this.catename);
        yddCate.setIcon(this.icon);
        yddCate.setSortNum(this.sort_num);
        yddCate.setDefaultData(this.default_data);
        return yddCate;
    }
}
